#include <ros/ros.h>
#include <learning_service/Person.h>

bool personCallback(learning_service::Person::Request &req, learning_service::Person::Response &res)
{
    ROS_INFO("Person: name:%s sex:%d age:%d", req.name.c_str(), req.sex, req.age);

    res.result = "OK";

    return true;
}

int main(int arg, char **args)
{
    ros::init(arg, args, "person_server");

    ros::NodeHandle node;

    ros::ServiceServer person_server = node.advertiseService("/show_person", personCallback);

    ROS_INFO("Ready to show person infomation.");

    ros::spin();

    return 0;
}